home *** CD-ROM | disk | FTP | other *** search
-
-
- AWF(1) Unix Programmer's Manual AWF(1)
-
-
- N✓N✓NA✓A✓AM✓M✓ME✓E✓E
- awf - amazingly workable (text) formatter
-
- S✓S✓SY✓Y✓YN✓N✓NO✓O✓OP✓P✓PS✓S✓SI✓I✓IS✓S✓S
- a✓a✓aw✓w✓wf✓f✓f -m✓m✓m_✓a_✓c_✓r_✓o_✓s [ file ] ...
-
- D✓D✓DE✓E✓ES✓S✓SC✓C✓CR✓R✓RI✓I✓IP✓P✓PT✓T✓TI✓I✓IO✓O✓ON✓N✓N
- _✓A_✓w_✓f formats the text from the input _✓f_✓i_✓l_✓e(s) (standard input if none) in
- an imitation of _✓n_✓r_✓o_✓f_✓f's style with the -m✓m✓ma✓a✓an✓n✓n or -m✓m✓ms✓s✓s macro packages. The
- -m✓m✓m_✓a_✓c_✓r_✓o option is mandatory and must be `-man' or `-ms'.
-
- _✓A_✓w_✓f implements the following raw _✓n_✓r_✓o_✓f_✓f requests:
-
- .\" .ce .fi .in .ne .pl .sp
- .ad .de .ft .it .nf .po .ta
- .bp .ds .ie .ll .nr .ps .ti
- .br .el .if .na .ns .rs .tm
-
- and the following in-text codes:
-
- \$ \% \* \c \f \n \s
-
- plus the full list of _✓n_✓r_✓o_✓f_✓f/_✓t_✓r_✓o_✓f_✓f special characters in the original V7
- _✓t_✓r_✓o_✓f_✓f manual.
-
- Many restrictions are present; the behavior in general is a subset of
- _✓n_✓r_✓o_✓f_✓f's. Of particular note are the following:
-
- +✓o Point sizes do not exist; .✓.✓.p✓p✓ps✓s✓s and \s✓s✓s are ignored.
-
- +✓o Conditionals implement only numeric comparisons on \n✓n✓n(✓(✓(.✓.✓.$✓$✓$, string com-
- parisons between a macro parameter and a literal, and n✓n✓n (always true)
- and t✓t✓t (always false).
-
- +✓o The implementation of strings is generally primitive.
-
- +✓o Expressions in (e.g.) .✓.✓.s✓s✓sp✓p✓p are fairly general, but the |✓|✓|, &✓&✓&, and :✓:✓:
- operators do not exist, and the implementation of \w✓w✓w requires that
- quote (') be used as the delimiter and simply counts the characters
- inside (so that, e.g., \w'\(bu' equals 4).
-
- White space at the beginning of lines, and imbedded white space within
- lines, is dealt with properly. Sentence terminators at ends of lines are
- understood to imply extra space afterward in filled lines. Tabs are im-
- plemented crudely and not quite correctly, although in most cases they
- work as expected. Hyphenation is done only at explicit hyphens, em-
- dashes, and _✓n_✓r_✓o_✓f_✓f discretionary hyphens.
-
- M✓M✓MA✓A✓AN✓N✓N M✓M✓MA✓A✓AC✓C✓CR✓R✓RO✓O✓OS✓S✓S
- The -m✓m✓ma✓a✓an✓n✓n macro set implements the full V7 manual macros, plus a few semi-
- random oddballs. The full list is:
-
- .B .DT .IP .P .RE .SM
- .BI .HP .IR .PD .RI .TH
- .BR .I .LP .PP .RS .TP
- .BY .IB .NB .RB .SH .UC
-
-
- U of Toronto 13 July 1990 1
-
-
-
-
- AWF(1) Unix Programmer's Manual AWF(1)
-
-
- .✓.✓.B✓B✓BY✓Y✓Y and .✓.✓.N✓N✓NB✓B✓B each take a single string argument (respectively, an indi-
- cation of authorship and a note about the status of the manual page) and
- arrange to place it in the page footer.
-
- M✓M✓MS✓S✓S M✓M✓MA✓A✓AC✓C✓CR✓R✓RO✓O✓OS✓S✓S
- The -m✓m✓ms✓s✓s macro set is a substantial subset of the V7 manuscript macros.
- The implemented macros are:
-
- .AB .CD .ID .ND .QP .RS .UL
- .AE .DA .IP .NH .QS .SH .UX
- .AI .DE .LD .NL .R .SM
- .AU .DS .LG .PP .RE .TL
- .B .I .LP .QE .RP .TP
-
- Size changes are recognized but ignored, as are .✓.✓.R✓R✓RP✓P✓P and .✓.✓.N✓N✓ND✓D✓D. .✓.✓.U✓U✓UL✓L✓L just
- prints its argument in italics. .✓.✓.D✓D✓DS✓S✓S/.✓.✓.D✓D✓DE✓E✓E does not do a keep, nor do any
- of the other macros that normally imply keeps.
-
- Assignments to the header/footer string variables are recognized and
- implemented, but there is otherwise no control over header/footer
- formatting. The D✓D✓DY✓Y✓Y string variable is available. The P✓P✓PD✓D✓D, P✓P✓PI✓I✓I, and L✓L✓LL✓L✓L
- number registers exist and can be changed.
-
- O✓O✓OU✓U✓UT✓T✓TP✓P✓PU✓U✓UT✓T✓T
- The only output format supported by _✓a_✓w_✓f, in its distributed form, is that
- appropriate to a dumb terminal, using overprinting for italics (via
- underlining) and bold. The _✓n_✓r_✓o_✓f_✓f special characters are printed as some
- vague approximation (it's sometimes very vague) to their correct
- appearance.
-
- _✓A_✓w_✓f's knowledge of the output device is established by a device file,
- which is read before the user's input. It is sought in _✓a_✓w_✓f's library
- directory, first as d✓d✓de✓e✓ev✓v✓v.✓.✓._✓t_✓e_✓r_✓m (where _✓t_✓e_✓r_✓m is the value of the TERM
- environment variable) and, failing that, as d✓d✓de✓e✓ev✓v✓v.✓.✓.d✓d✓du✓u✓um✓m✓mb✓b✓b. The device file
- uses special internal commands to set up resolution, special characters,
- fonts, etc., and more normal _✓n_✓r_✓o_✓f_✓f commands to set up page length etc.
-
- F✓F✓FI✓I✓IL✓L✓LE✓E✓ES✓S✓S
- All in /_✓u_✓s_✓r/_✓l_✓i_✓b/_✓a_✓w_✓f (this can be overridden by the AWFLIB environment
- variable):
-
- common common device-independent initialization
- dev.* device-specific initialization
- mac.m* macro packages
- pass1 macro substituter
- pass2.base central formatter
- pass2.m* macro-package-specific bits of formatter
- pass3 line and page composer
-
- S✓S✓SE✓E✓EE✓E✓E A✓A✓AL✓L✓LS✓S✓SO✓O✓O
- awk(1), nroff(1), man(7), ms(7)
-
-
-
-
-
-
-
- U of Toronto 13 July 1990 2
-
-
-
-
- AWF(1) Unix Programmer's Manual AWF(1)
-
-
- D✓D✓DI✓I✓IA✓A✓AG✓G✓GN✓N✓NO✓O✓OS✓S✓ST✓T✓TI✓I✓IC✓C✓CS✓S✓S
- Unlike _✓n_✓r_✓o_✓f_✓f, _✓a_✓w_✓f complains whenever it sees unknown commands and macros.
- All diagnostics (these and some internal ones) appear on standard error
- at the end of the run.
-
- H✓H✓HI✓I✓IS✓S✓ST✓T✓TO✓O✓OR✓R✓RY✓Y✓Y
- Written at University of Toronto by Henry Spencer, more or less as a
- supplement to the C News project.
-
- =✓> None of the above really want to admit it. =✓<
-
- B✓B✓BU✓U✓UG✓G✓GS✓S✓S
- There are plenty, but what do you expect for a text formatter written
- entirely in (old) _✓a_✓w_✓k?
-
- The -m✓m✓ms✓s✓s stuff has not been checked out very thoroughly.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- U of Toronto 13 July 1990 3
-
-
-